package com.ly.hotel.model;

import java.io.Serializable;



/**
 * 电影
 * 
 * @author 熊伟
 * 
 */
public class Vodvideo implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;

	/**
	 * 电影类型
	 */
	private Integer type;

	private MovieType movieType;

	/**
	 * 电影名称
	 */
	private String name;

	/**
	 * 海报
	 */
	private String img;

	/**
	 * 费用（改成了端口号）
	 */
	private Double cost;

	/**
	 * 电影路径
	 */
	private String path;

	/**
	 * 优先级
	 */
	private Integer priority;

	/**
	 * 状态
	 */
	private int status;//历史原因，一直没用到，现在用来标记视频的大小了

	//播放到了那里
	private Integer playPosition = 0;
	

	public Integer getPlayPosition() {
		return playPosition;
	}

	public void setPlayPosition(Integer playPosition) {
		this.playPosition = playPosition;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public MovieType getMovieType() {
		return movieType;
	}

	public void setMovieType(MovieType movieType) {
		this.movieType = movieType;
	}

	public String getName() {
		String n[] = name.split(":");
		if(n!=null){
			return n[0];
		}else{
			return name;
		}
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img == null ? null : img.trim();
	}

	/*获取服务器的端口号*/
	public String getServerPort() {
		int v = (int)cost.longValue();
		String port = Integer.toString(v);
		
		return port;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path == null ? null : path.trim();
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public int getVodSize() {
		return status;
	}

}